#!/bin/sh
echo ac_cv_file__dev_ptmx=no > config.site
echo ac_cv_file__dev_ptc=no >> config.site
#echo ac_cv_header_signal_h=no >> config.site
#echo ac_cv_func_sigaction=no >> config.site
CONFIG_SITE=config.site 

PREFIX=$PWD/../python-android-install 
NDK=/home/chenc/workspace/Android/Sdk/ndk-bundle 
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/ 
PLATFORM=$NDK/platforms/android-8/arch-arm/ 
CC=$PREBUILT/bin/arm-linux-androideabi-gcc 
CXX=$PREBUILT/bin/arm-linux-androideabi-g++ 
LDFLAGS="--sysroot=$PLATFORM -Wl,-E" 
CFLAGS="-I$PLATFORM/usr/include -fPIC -rdynamic" 
CXXFLAGS=$CFLAGS 
LIBS="-Wl,-Bstatic   -lm  -Wl,-Bdynamic" 

CONFIG_SITE=$CONFIG_SITE CC=$CC CXX=$CXX LDFLAGS=$LDFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LIBS=$LIBS ./configure --prefix=$PREFIX --host=arm-linux-androideabi --build=i686-pc-linux-gnu  --disable-ipv6 #--enable-shared
